The woman was shot in the 100 block of Chestnut Street around 1:10 a.m., Wednesday, Feb. 16, Allentown police said.
The victim was taken by ambulance to an area hospital, where she was in stable condition.
Nearly an hour later, officers found the alleged gunman in the 600 block of North Penn Street and arrested him without incident.
The man was identified as Kyle C. Birch, 36, of Allentown, police said. He was confirmed to be the victim's ex-boyfriend.
Birch was arraigned on charges of attempted murder, aggravated assault, person not to possess firearms, and simple assault.
He was committed to the Lehigh County Prison with bail denied, according to public court records. A judge deemed him a danger to the community, the records show.
His preliminary hearing is set for Feb. 23.
Click here to follow Daily Voice West Chester and receive free news updates.